home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
Pointing.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
7KB
|
262 lines
;
; File: Pointing.a
;
; Contains: Pointer Family Interface
;
; Version: Technology: Copland
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__POINTING__') = 'UNDEFINED' THEN
__POINTING__ SET 1
IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
include 'Kernel.a'
ENDIF
IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
include 'NameRegistry.a'
ENDIF
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
; *************** Constants ***************
kAnyDeviceClass EQU 'anyp'
kMouseDeviceClass EQU 'mous'
kTabletDeviceClass EQU 'tblt'
kJoystickDeviceClass EQU 'joys'
kTrackballDeviceClass EQU 'trkb'
kTrackpadDeviceClass EQU 'trkp'
k3DTrackballDeviceClass EQU '3dtb'
kMinPTDataSize EQU 24
kPointerFamilyError EQU -1
kPTUnknownRegEntryRef EQU -2
kPTInvalidTrackerRef EQU -3
kPTMemoryAllocationFailed EQU -4
kPTParamErr EQU -5
; typedef UInt16 PTDataRelation
kAbsoluteData EQU 1
kRelativeData EQU 2
kAbsoluteOrRelativeData EQU 3
; *************** Public Data Structures ***************
; old name is TrackerID
; typedef unsigned long PTButtonState
; typedef PTButtonState * PTButtonStatePtr
PTPosition RECORD 0
x ds.l 1 ; offset: $0 (0)
y ds.l 1 ; offset: $4 (4)
z ds.l 1 ; offset: $8 (8)
sizeof EQU * ; size: $C (12)
ENDR
; typedef struct PTPosition * PTPositionPtr
; old name is PointerData
PTData RECORD 0
sequencingTag ds AbsoluteTime ; offset: $0 (0)
position ds PTPosition ; offset: $8 (8)
buttons ds.l 1 ; offset: $14 (20)
uniqueDeviceData ds.l 1 ; offset: $18 (24)
sizeof EQU * ; size: $1C (28)
ENDR
; typedef struct PTData * PTDataPtr
PTDeviceModes RECORD 0
relation ds.w 1 ; offset: $0 (0)
uniqueDeviceModes ds.l 1 ; offset: $2 (2)
sizeof EQU * ; size: $6 (6)
ENDR
; typedef struct PTDeviceModes * PTDeviceModesPtr
; typedef OSType PTDeviceClass
PTDeviceIdentifier RECORD 0
identifier ds.b 255 ; offset: $0 (0)
ORG 256
sizeof EQU * ; size: $100 (256)
ENDR
; typedef struct PTDeviceIdentifier * PTDeviceIdentifierPtr
PTDeviceCapabilities RECORD 0
deviceClass ds.l 1 ; offset: $0 (0)
dataSize ds.l 1 ; offset: $4 (4)
modeDataSize ds.l 1 ; offset: $8 (8)
availableDataRelations ds.w 1 ; offset: $C (12)
defaultDataRelation ds.w 1 ; offset: $E (14)
latency ds.l 1 ; offset: $10 (16)
imitatesMouse ds.b 1 ; offset: $14 (20)
ORG 22
sizeof EQU * ; size: $16 (22)
ENDR
; typedef struct PTDeviceCapabilities * PTDeviceCapabilitiesPtr
PTPinningRectList RECORD 0
numRects ds.w 1 ; offset: $0 (0) ; number of rects in list
pinningRect ds.l 1 ; offset: $2 (2) ; pointer to a list of rects
; rects must be in global coordinates, in pixels
sizeof EQU * ; size: $6 (6)
ENDR
; typedef struct PTPinningRectList * PTPinningRectListPtr
; *************** Client Interfaces ***************
; *** Getting information about Devices ***
;
; extern OSStatus PTGetNextDevice(RegEntryRef *currentDevice, PTDeviceClass filter, RegEntryRef **nextDevice)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetNextDevice
ENDIF
;
; extern OSStatus PTGetDeviceCapabilities(RegEntryRef *device, PTDeviceCapabilities *capabilities)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetDeviceCapabilities
ENDIF
;
; extern OSStatus PTGetDeviceIdentification(RegEntryRef *device, PTDeviceIdentifier *identification)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetDeviceIdentification
ENDIF
; *** Setting Device Modes ***
;
; extern OSStatus PTGetDeviceModes(RegEntryRef *device, ByteCount offset, ByteCount numBytes, PTDeviceModes *modes)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetDeviceModes
ENDIF
;
; extern OSStatus PTSetDeviceModes(RegEntryRef *device, ByteCount offset, ByteCount numBytes, PTDeviceModes *modes)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetDeviceModes
ENDIF
; *** Registering with the Pointing Family ***
;
; PTRegisterNewTracker:
; The client provides a reference to device she wants a connection with,
; and whether buffered and/or static data are needed. A TrackerRef is
; returned, which the client must use in all future communications with
; the Pointing Family. In addition, the size of the PTData structure
; that the given device generates is returned.
;
;
; extern OSStatus PTRegisterNewTracker(RegEntryRef *device, Boolean bufferedData, Boolean stateData, PTTrackerRef *tracker, ByteCount *dataSize)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTRegisterNewTracker
ENDIF
; *** Maintaining Trackers ***
;
; extern OSStatus PTSetPinningRects(PTTrackerRef tracker, PTPinningRectList *rectList)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetPinningRects
ENDIF
; *** Getting Data ***
; DataSize indicates the size of the buffer allocated by the client for dataPtr.
;
; extern OSStatus PTGetTrackerData(PTTrackerRef tracker, ByteCount dataSize, PTData *dataPtr)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetTrackerData
ENDIF
;
; extern OSStatus PTFlushTrackerBuffer(PTTrackerRef tracker)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTFlushTrackerBuffer
ENDIF
; *** Checking Tracker State ***
;
; extern OSStatus PTGetPosition(PTTrackerRef tracker, PTPosition *position)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetPosition
ENDIF
;
; extern OSStatus PTSetPosition(PTTrackerRef tracker, PTPosition *position)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetPosition
ENDIF
;
; extern OSStatus PTMovePosition(PTTrackerRef tracker, PTPosition *position)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTMovePosition
ENDIF
;
; extern OSStatus PTGetButtons(PTTrackerRef tracker, PTButtonState *buttons)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetButtons
ENDIF
;
; extern OSStatus PTSetButtons(PTTrackerRef tracker, PTButtonState buttons)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetButtons
ENDIF
;
; extern OSStatus PTGetTrackerState(PTTrackerRef tracker, ByteCount dataSize, PTData *data)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetTrackerState
ENDIF
;
; extern OSStatus PTSetTrackerState(PTTrackerRef tracker, ByteCount dataSize, PTData *data)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetTrackerState
ENDIF
;
; extern OSStatus PTGetTrackerDataByOffset(PTTrackerRef tracker, ByteCount offset, ByteCount numBytes, void *buffer)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTGetTrackerDataByOffset
ENDIF
;
; extern OSStatus PTSetTrackerDataByOffset(PTTrackerRef tracker, ByteCount offset, ByteCount numBytes, void *buffer)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PTSetTrackerDataByOffset
ENDIF
ENDIF
ENDIF ; __POINTING__